package com.itcast.chapter01;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * 注册时间监听器
 * @author : zjj
 * @date : 2022/9/5 17:34
 */

@Component
public class RegisterEventHandler {
    /**
     * 注册发送短信时间监听器
     * @param userRegisterSendSmsEvent
     */
    @EventListener
    private void sendSms(UserRegisterSendSmsEvent userRegisterSendSmsEvent){
        System.out.println("发送短信");
    }

    @EventListener
    private void sendEmail(UserRegisterSendEmailEvent userRegisterSendEmailEvent){
        System.out.println("发送Email");
    }


}
